package com.motorola.dp.jenkinsmonitor.model.entity;

import java.util.List;

import com.motorola.dp.jenkinsmonitor.model.util.svn.SvnModule;

public class Customer {

    private String name;

    private List<SvnModule> modules;

    private List<JenkinsJob> jobs;

    public Customer(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<SvnModule> getModules() {
        return modules;
    }

    public void setModules(List<SvnModule> modules) {
        this.modules = modules;
    }

    public List<JenkinsJob> getJobs() {
        return jobs;
    }

    public void setJobs(List<JenkinsJob> jobs) {
        this.jobs = jobs;
    }

    @Override
    public String toString() {
        return "Customer [name=" + name + "]";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((name == null) ? 0 : name.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        Customer other = (Customer) obj;
        if (name == null) {
            if (other.name != null) {
                return false;
            }
        } else if (!name.equals(other.name)) {
            return false;
        }
        return true;
    }

}
